package com.jeesite.modules.dp.entity.kccode;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;

/**
 * 观看码管理Entity
 * @author hancing.com
 * @version 2025-01-02
 */
@Table(name="dp_kechengcode", alias="a", label="观看码信息", columns={
		@Column(name="id", attrName="id", label="ID", isPK=true),
		@Column(name="kcid", attrName="kcid", label="课程ID"),
		@Column(name="kccode", attrName="kccode", label="观看码"),
		@Column(name="uno", attrName="uno", label="购买用户"),
		@Column(name="codestatus", attrName="codestatus", label="购买用户"),
		@Column(name="locktime", attrName="locktime", label="购买用户"),
		@Column(name="lockorderid", attrName="lockorderid", label="购买用户"),
	}, orderBy="a.id DESC"
)
public class DpKechengcode extends DataEntity<DpKechengcode> {
	
	private static final long serialVersionUID = 1L;
	private String kcid;		// 课程ID
	private String kccode;		// 观看码
	private String uno;		// 购买用户
	private String codestatus;
	private Date locktime; 
	private String lockorderid;

	@ExcelFields({
		@ExcelField(title="课程ID", attrName="kcid", align=Align.CENTER, sort=20),
		@ExcelField(title="观看码", attrName="kccode", align=Align.CENTER, sort=30),
	})
	public DpKechengcode() {
		this(null);
	}
	
	public DpKechengcode(String id){
		super(id);
	}
	
	@NotBlank(message="课程ID不能为空")
	@Size(min=0, max=36, message="课程ID长度不能超过 36 个字符")
	public String getKcid() {
		return kcid;
	}

	public void setKcid(String kcid) {
		this.kcid = kcid;
	}
	
	@NotBlank(message="观看码不能为空")
	@Size(min=0, max=255, message="观看码长度不能超过 255 个字符")
	public String getKccode() {
		return kccode;
	}

	public void setKccode(String kccode) {
		this.kccode = kccode;
	}
	
	@Size(min=0, max=36, message="购买用户长度不能超过 36 个字符")
	public String getUno() {
		return uno;
	}

	public void setUno(String uno) {
		this.uno = uno;
	}

	public String getCodestatus() {
		return codestatus;
	}

	public void setCodestatus(String codestatus) {
		this.codestatus = codestatus;
	}

	public Date getLocktime() {
		return locktime;
	}

	public void setLocktime(Date locktime) {
		this.locktime = locktime;
	}

	public String getLockorderid() {
		return lockorderid;
	}

	public void setLockorderid(String lockorderid) {
		this.lockorderid = lockorderid;
	}
	
}